<?php defined('BASEPATH') or exit('No direct script access allowed.'); ?>
<form class="form-horizontal" role="form" id="validateform" name="validateform" action="<?php echo current_url()?>" >
<div class='panel panel-default'>
	<div class='panel-heading'>
		<i class='icon-edit icon-large'></i>
		<?php echo $is_edit?"修改":"新增"?>添加优惠卷
		<div class='panel-tools'>
			<div class='btn-group'>
				<?php aci_ui_a($folder_name,'Coupon','index','',' class="btn  btn-sm "','<span class="glyphicon glyphicon-arrow-left"></span> 返回')?>
			</div>
		</div>
	</div>
	<div class='panel-body'>
		<fieldset>
				<legend>基本信息</legend>
					<div class="form-group">
						<label class="col-sm-2 control-label">优惠卷名称</label>
						<div class="col-sm-4">
						  <input name="coupon_name" type="text" class="form-control" id="password" placeholder="请输入优惠卷名称" value=""/>
						</div>
					</div>
					<div class="form-group">
						<label  class="col-sm-2 control-label">优惠类型</label>
						<div class="col-sm-4">
						  <select name="type" class="form-control">
						  	<option value= "1">全能类型</option>
						  	<option value="2">满减类型</option>
						  </select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">开始时间</label>
						<div class="col-sm-4">
						  <input name="start_time" type="text" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="form-control Wdate"  />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">结束时间</label>
						<div class="col-sm-4">
						  <input name="end_time" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="form-control Wdate" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">实际价格</label>
						<div class="col-sm-4">
						  <input name="actual_price" type="number" class="form-control" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">满减价格</label>
						<div class="col-sm-4">
						  <input name="fill_price" type="number" class="form-control" />
						</div>
					</div>
			</fieldset>

		<div class='form-actions'>
			<?php aci_ui_button($folder_name,'Coupon','add',' type="submit" id="dosubmit" class="btn btn-primary " ','保存')?>
		</div>
     </div>

</form>
<script src="<?php echo base_url('/scripts/My97DatePicker/WdatePicker.js')?>" ></script>
<script language="javascript" type="text/javascript">
	var edit= <?php echo $is_edit?"true":"false"?>;
	var folder_name = "<?php echo $folder_name?>";
	require(['<?php echo SITE_URL?>scripts/common.js'], function (common) {
		require(['<?php echo SITE_URL?>scripts/<?php echo $folder_name?>/<?php echo $controller_name?>/edit.js']);
	});
</script>